my file learn about tech container (docker, podman, kubernetes)
ansible <pattern> <options>
---
- name: Playbook setup web server
hosts: node_docker
# become: yes
# become_method: sudo
tasks:
- name: Update repository
ansible.builtin.apt:
update_cache: true
- name: Install nginx
ansible.builtin.apt:
name: nginx
state: latest
- name: Copy file html
ansible.builtin.copy:
src: ./web/
dest: /var/www/html
- name: Start nginx
ansible.builtin.service:
name: nginx
state: started
ansible-playbook <file>
ansible-playbook 01\ -\ playbook-webserver.yaml
nmap node1
# 80/tcp open http
curl node1
# <h1>Test Web Aria Fatah</h1>
pip3 install ansible-lint